package com.project.service;


import com.project.dao.TrueFalseMapper;
import com.project.entity.TrueFalse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional(rollbackFor = {Exception.class})
@Service
public class TrueFalseServiceImpl implements TrueFalseService{
    @Autowired
    TrueFalseMapper trueFalseMapper;

    @Override
    public int add(TrueFalse trueFalse)
    {
        return trueFalseMapper.insertSelective(trueFalse);
    }

    @Override
    public TrueFalse findByExerciseInfoId(Integer exerciseinfoid) {
        return trueFalseMapper.selectByExerciseInfoId(exerciseinfoid);
    }

    @Override
    public int modify(TrueFalse trueFalse)
    {
        return trueFalseMapper.updateByPrimaryKeySelective(trueFalse);
    }
}
